<html>
	<head>
		<title>
		
		</title>
	</head>
	<body>
		<h1>Menu Item Manager: [Bewerken]</h1>
		<?php echo form_open("admin/menu_items/update/".$menu_item->id.""); ?>
		<label>Titel</label>
			<input type="text" name="title" value="<?php echo $menu_item->title; ?>" />
			<?php if(!$menu_item->is_default):?>
			<h3>Artikelen</h3>
				<ul>
				<?php foreach($articles as $article):?>
						<?php if($linked_item['type'] == 'article'): ?>
							<?php if($linked_item['article_id'] == $article->id): ?>
								<li><input type="radio" name="alias" checked value="<?php echo $article->alias; ?>" /><?php echo $article->title; ?> </li>
							<?php else: ?>
								<li><input type="radio" name="alias" value="<?php echo $article->alias; ?>" /><?php echo $article->title; ?> </li>
							<?php endif; ?>
						<?php else: ?>
						<li><input type="radio" name="alias" value="<?php echo $article->alias; ?>" /><?php echo $article->title; ?> </li>
						<?php endif; ?>
				<?php endforeach; ?>
				</ul>
			<h3>Categories</h3>
			<ul>
			<?php foreach($categories as $category):?>
					<?php if($linked_item['type'] == 'category'): ?>
							<?php if($linked_item['category_id'] == $category->id): ?>
								<li><input type="radio" name="alias" checked value="<?php echo $category->alias; ?>" /><?php echo $category->title; ?> </li>
							<?php else: ?>
								<li><input type="radio" name="alias" value="<?php echo $category->alias; ?>" /><?php echo $category->title; ?> </li>
							<?php endif; ?>
					<?php else: ?>
						<li><input type="radio" name="alias" value="<?php echo $category->alias; ?>" /><?php echo $category->title; ?> </li>
					<?php endif; ?>
			<?php endforeach; ?>
			</ul>
			<input type="submit" value="opslaan">
		</form>
		<?php endif;?>
		<p />
		<?php echo anchor("admin/menu_items/menu_id/1", "Terug naar menu items"); ?>
	</body>
</html>